<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.org/ui" xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

	<p:dataTable var="log" value="#{LoglarBean.logList}"
		rowKey="#{log.logid}" paginator="true" rows="10"
		selection="#{LoglarBean.selectedLog}" selectionMode="single"
		id="logs" widgetVar="logsTable">

		<f:facet name="header">  
            LIST OF LOGS <br></br>  <br></br>
       	</f:facet>
       	
		<f:facet name="header">
			<p:outputPanel>
				<h:outputText value="Search all fields: " />
				<p:inputText id="globalFilter"
					onkeyup="logsTable.filter()" style="width:150px" />
			</p:outputPanel>
		</f:facet>
		<p:column headerText="Seri No"
			sortBy="#{log.musteriaygitlari.aygitSeriNo}"
			filterBy="#{log.musteriaygitlari.aygitSeriNo}" id="srnNo">  
			<center>	#{log.musteriaygitlari.aygitSeriNo} </center>  
		</p:column>

		<p:column headerText="Tarih" sortBy="#{log.tarih}"
			filterBy="#{log.tarih}" id="tarih">  
		   <center> 	#{log.tarih}  </center>
        </p:column>

		<p:column headerText="ip" sortBy="#{log.ip}" filterBy="#{log.ip}" id="ip">  
			<center>	#{log.ip}  </center>
        </p:column>
		
		<f:facet name="footer">
			<p:commandButton id="detailButton" value="View"
				icon="ui-icon-search" oncomplete="logDialog.show()"
				action="#{LoglarBean.viewDetail}"
				update=":musteriUrunForm:logDlgPgrid, :musteriUrunForm:messages" />
		</f:facet>
	</p:dataTable>
	<p:dialog header="Log Detail" widgetVar="logDialog" resizable="false"  
              width="200" showEffect="explode" hideEffect="explode" >  
  
        <h:panelGrid id="logDlgPgrid" columns="2" cellpadding="4">  
  
            <h:outputText value="Marka - Model : " />  
            <h:outputText value="#{LoglarBean.selectedLog.musteriaygitlari.aygit.marka} - 
            #{LoglarBean.selectedLog.musteriaygitlari.aygit.model}" id="m-m"/>  
  
            <h:outputText value="Seri No : " />  
            <h:outputText value="#{LoglarBean.selectedLog.musteriaygitlari.aygitSeriNo}" id="Srnno"/>  
  
            <h:outputText value="Tarih : " />  
            <h:outputText value="#{LoglarBean.selectedLog.tarih}" id="trh"/>  
  
            <h:outputText value="IP : " />  
            <h:outputText value="#{LoglarBean.selectedLog.ip}" id="color"/>
            
            <h:outputText value="Yapılan işlem : " />  
            <h:outputText value="#{LoglarBean.selectedLog.yapilanislem}" id="isl"/>
            
            <h:outputText value="Hata : " />  
            <h:outputText value="#{LoglarBean.selectedLog.hata}" id="hata"/>
            
            <h:outputText value="Çözüm : " />  
            <h:outputText value="#{LoglarBean.selectedLog.cozum}" id="czm"/>      
        </h:panelGrid>  
    </p:dialog>  
</ui:composition>